package com.wwg.warehouse.entities

import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
import java.io.Serializable

data class WBookmark(
    @SerializedName("name")
    val name: String,
    @SerializedName("path")
    var path: String? = null,
    @SerializedName("type")
    var type: String,
    @SerializedName("url")
    var url: String? = null,
    @SerializedName("date_added")
    var date: String? = null,
    @SerializedName("children")
    val children: List<WBookmark>? = null,

    @Expose
    var isSelected: Boolean = false,
    @Expose
    var parent: WBookmark? = null,
    @Expose
    var isComputer: Boolean = false
): Serializable

data class WBookmarks(
    @SerializedName("synced")
    var synced: WBookmark? = null,//同步的数据（本地的数据）
    @SerializedName("bookmark_bar")
    var bookmarkBar: WBookmark? = null,//书签栏
    @SerializedName("other")
    var other: WBookmark? = null //其他书签
): Serializable

data class ServerBookmarks(
    @SerializedName("checksum")
    var checksum: String? = null,
    @SerializedName("roots")
    var roots: WBookmarks? = null,
    @SerializedName("version")
    var version: String? = null
): Serializable

data class Settings(
    @SerializedName("bookmarks")
    var bookmarks: ServerBookmarks? = null
): Serializable

data class SyncBean(
    var types: Int = 0,
    var settings: Settings? = null,
    var versions: Versions? = null
): Serializable

data class Versions(
    var bookmarks: Int = 0,
    var mouse_gestures: Int = 0,
    var ntp: Int = 0,
    var theme: Int = 0,
    var normal: Int = 0,
    var passwords: Int = 0,
): Serializable

data class CommonResponse<T>(
    var status: Int = -1,
    var message: String = "failed",
    var info: T? = null
)